-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sui-types] avoid deserialization when fetching ID of non-upgraded pa… #19849
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
…ckages The `original_package_id` function is showing up in some slow traces, so make it less expensive in the (common) case of grabbing the ID of a non-upgraded package
7dcbab6
to
856819c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense -- in hindsight, we should have included the package's own linkage information in the linkage_table
to avoid this...
@@ -483,6 +483,10 @@ impl MovePackage { | |||
/// The ObjectID that this package's modules believe they are from, at runtime (can differ from | |||
/// `MovePackage::id()` in the case of package upgrades). | |||
pub fn original_package_id(&self) -> ObjectID { | |||
if self.version == OBJECT_START_VERSION { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget, packages don't get the lamport timestamp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are versioned linearly.
…ckages
The
original_package_id
function is showing up in some slow traces, so make it less expensive in the (common) case of grabbing the ID of a non-upgraded package